package com.jysz.certificate.persistence.enums;
/**
 * 合格证是否为导入标示
 * @author zhouhang
 */
public enum CopyOfCertificationImporting {
	 YES("是",0),NO("否",1), RENEW("换证入库", 2);
    //名称
    private String name;
    //索引
    private int index;   
    private CopyOfCertificationImporting(String name, int index) {   
        this.name = name;   
        this.index = index;   
    }   
    
    //根据索引获得名称
    public static String getName(int index) {   
        for (CopyOfCertificationImporting w : CopyOfCertificationImporting.values()) {   
            if (w.getIndex() == index) {   
                return w.name;   
            }   
        }   
        return null;   
    }
    
    public String getName() {   
        return name;   
    }   
    public void setName(String name) {   
        this.name = name;   
    }   
    public int getIndex() {   
        return index;   
    }   
    public void setIndex(int index) {   
        this.index = index;   
    }   
    
}
